package interview.huawei.myself.online1.v2;

/**
 * @Author CandyWall
 * @Date 2022/3/10--15:32
 * @Description
 */
public class Main {
    public static void main(String[] args) {
        MessageQueue messageQueue = new MessageQueue(5);
        new Producer("生产者1", messageQueue);
        new Producer("生产者2", messageQueue);
        new Producer("生产者3", messageQueue);
        new Producer("生产者4", messageQueue);
        new Producer("生产者5", messageQueue);
        new Consumer("奇数消费者1", messageQueue, 1);
        new Consumer("奇数消费者2", messageQueue, 1);
        new Consumer("偶数消费者1", messageQueue, 0);
        new Consumer("偶数消费者2", messageQueue, 0);
        new Consumer("偶数消费者3", messageQueue, 0);
    }
}


